package bean;


import hibernate.ClasseRepository;

import java.io.Serializable;
import java.util.List;

import javax.faces.bean.ManagedBean;

import metier.ClasseBusiness;

@ManagedBean
public class ClasseBean implements Serializable {


	private int id_classe;
	private String nom_classe;
	private String description_classe;
	private List <EleveBean> eleves;
	private List <ClasseBean> classes;
	private ClasseBusiness classeBusinessCourante;

	public ClasseBean(){

		super();
		classeBusinessCourante = new ClasseBusiness();

	}

	public int getId_classe() {
		return id_classe;
	}

	public void setId_classe(int id_classe) {
		this.id_classe = id_classe;
	}

	public String getNom_classe() {
		return nom_classe;
	}

	public void setNom_classe(String string) {
		this.nom_classe = string;
	}

	public String getDescription_classe() {
		return description_classe;
	}

	public void setDescription_classe(String description_classe) {
		this.description_classe = description_classe;
	}

	public List<EleveBean> getEleves() {
		return eleves;
	}

	public void setEleves(List<EleveBean> eleves) {
		this.eleves = eleves;
	}

	public List <ClasseBean> getClasses() {
		
		ClasseRepository classeRepo = new ClasseRepository();
		return classeRepo.GetAll();
	}

	public void setClasses(List <ClasseBean> classes) {
		this.classes = classes;
	}

	public ClasseBusiness getClasseBusinessCourante() {
		return classeBusinessCourante;
	}

	public void setClasseBusinessCourante(ClasseBusiness classeBusinessCourante) {
		this.classeBusinessCourante = classeBusinessCourante;
	}
	
}
